﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using LocalDBDemo;

namespace DemoWP7
{
    public partial class AddEmployee : PhoneApplicationPage
    {
        public AddEmployee()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            var employee = new Employee1
            {
                FirstName = textBox1.Text,
                LastName = textBox2.Text
            };

            DBHelper.AddEmployee(employee);
            NavigationService.GoBack();
        }
    }
}